home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / March 96 / Re Any tips for Building ODF.1 < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  2.2 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Any tips for Building ODF with CW8 CFM68k?
  2. Sent:        3/23/96 1:27 PM
  3. Received:    3/25/96 8:25 AM
  4. From:        Jim Lloyd, jim@melongem.com
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. At 1:21 AM 3/24/96, Masahiro Abe wrote:
  9. >Hi all,
  10. > I've long tried to build ODF libraries and examples with CodeWarrior for
  11. >my IIci. I haven't succeeded it yet. I would like to see if anyone had done
  12. >this with latest release of CW8 with latest C/C++ 68k patch, and would like
  13. >to know how it was done in detail.
  14. >
  15. > In my case, all source get compiled fine (with several modifications based
  16. >on WWW and NewsGroup info), but at link time, linker always complain that
  17. >it couldn't resolve references to "somGetGlobalEnvironment" or other SOM
  18. >related name. I've disassembled the caller and found it is really calling
  19. >"somGetGlobalEnvironment", but "somlib" shared library has entry name of
  20. >"_%somGetGlobalEnvironment".
  21. > If I build DrawEditor68k sample part, it correctly references to
  22. >"_%somGetGlobalEnvironment".
  23.  
  24. This is a known bug in the way "#pragma import reset" works.  Hopefully
  25. there will be a fix soon.  In the meantime, you can workaround the problem
  26. in the following way.  The linker tells you that somGetGlobalEnvironment is
  27. unresolved in some translation unit, say FWxxxxxx.cpp.  Open up that file
  28. and add a line that looks like this:
  29.  
  30. #pragma import list somGetGlobalEnvironment
  31.  
  32. Put the line after all of the #includes and before the first function
  33. definition.  If there is more than one unresolved function in a translation
  34. unit, you can list them like this:
  35.  
  36. #pragma import list somGetGlobalEnvironment,somNewInstance
  37.  
  38. There is another bug that is preventing us from building ODF 1 with
  39. CodeWarrior CFM68K, but I expect a fix from Metrowerks very soon.  Odds are
  40. very good that we will have support for CW CFM68K in our ODF 1 release (mid
  41. April).  Note that the bug we're seeing shouldn't affect ODF 1.0d11 since
  42. it relies on statically linking all of ODF into your part.  The bug is that
  43. CW doesn't correctly honor the CFM68K calling conventions for returning a
  44. 4-byte struct by value as a function result (result should be passed in
  45. D0).
  46.  
  47. Jim Lloyd
  48. ODF Team
  49.  
  50.  
  51.